<?php

namespace app\models;

use Yii;

/**
 * Course is the ActiveRecord behind the contact form.
 */
class CourseKnowledge extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'b_course_knowledge_point';
    }
    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['name', 'content', 'course_id', 'create_by'], 'required'],
            [['name'], 'string', 'max' => 255],
            [['content'], 'string', 'max' => 512],
            [['major_id', 'update_by', 'del_flag'], 'integer'],
            [['id'], 'unique'],
        ];
    }

    /**
     * @return array customized attribute labels
     */
    public function attributeLabels()
    {
        return [
            'name' => 'Name',
        ];
    }
}
